/**
 * 
 */
package com.lanswon.controller.admin;

import java.io.IOException;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.lanswon.service.SearchService;

/**
 * 
 * @ClassName: BannerController.java
 * @Description: 该类的功能描述
 *
 * @version: v1.0.0
 * @author: zm
 * @date: 2018年5月4日 下午4:40:40
 *
 */

@Controller
@RequestMapping("admin/search/")
public class AdminSearchController {

	@Autowired
	SearchService searchService;

	@RequestMapping("index")
	public String index(HttpServletRequest request, HttpServletResponse response) {
		return "admin/search/search";
	}

	@RequestMapping("load")
	@ResponseBody
	public Object load(Integer page, Integer limit, String type, String content) throws IOException {
		return searchService.load(page, limit, type, content);

	}

	@RequestMapping("reset")
	@ResponseBody
	public void reset(Long searchId) throws IOException {
		searchService.reset(searchId);

	}
}
